.auto-grid {
  &.query-grid {
    .el-select,
    .el-input,
    .el-textarea {
      width: 168px;
    }
    .my-cascader {
      .el-select,
      .el-input {
        width: 100%;
      }
    }
  }
  &.form-grid {
    &.el-form--block,
    .el-form--block {
      .el-form-item.el-form-item--large {
        width: calc(100% - 32px);
      }
      .el-select,
      .el-input {
        width: 100%;
      }
      .my-cascader {
        .el-select,
        .el-input,
        .el-input-number {
          width: 100%;
        }
      }
    }
    &.el-form--inline,
    .el-form--inline {
      .el-form-item {
        vertical-align: top;
      }
      .el-select,
      .el-input,
      .el-input-number,
      .el-textarea,
      .meta-upload,
      .el-progress {
        min-width: 240px;
      }
      .my-cascader {
        .el-select,
        .el-input {
          width: 100%;
        }
      }
      .el-form-item__content {
        min-width: 44px;
      }
    }
  }
  .el-form-item--default .el-form-item__label {
    line-height: 1.25;
    display: inline-flex;
    align-items: center;
  }
  &.el-form--inline.inline-form {
    .el-form-item {
      min-width: 350px;
    }
  }
  .inline-grid {
    display: flex;
    .el-form-item {
      width: auto;
    }
  }
  .flex {
    display: flex;
  }
  .flex-column {
    flex-direction: column;
  }
  .flex.el-form-item {
    display: flex;
  }
  .flex-start {
    justify-content: flex-start;
  }
  .flex-end {
    justify-content: flex-end;
  }
  .flex-center {
    justify-content: center;
  }
  .align-start {
    align-items: flex-start;
  }
  .align-end {
    align-items: flex-end;
  }
  .flex-between {
    justify-content: space-between;
  }
  .align-center {
    align-items: center;
  }
  .flex-wrap {
    flex-wrap: wrap;
  }
  .mr-10 {
    margin-right: 10px;
  }
  .mr-20 {
    margin-right: 20px;
  }
  .ml-10 {
    margin-left: 10px;
  }
  .ml-20 {
    margin-left: 20px;
  }
  .grid.col-1 {
    display: flex;
    flex-wrap: wrap;
  }
  // .grid {
  //   display: grid;
  //   grid-gap: 10px;

  //   &.col-2 {
  //     grid-template-columns: repeat(2, 1fr);
  //   }
  //   &.col-3 {
  //     grid-template-columns: repeat(3, 1fr);
  //   }
  //   &.col-4 {
  //     grid-template-columns: repeat(4, 1fr);
  //   }
  //   &.col-5 {
  //     grid-template-columns: repeat(5, 1fr);
  //   }
  //   &.col-6 {
  //     grid-template-columns: repeat(6, 1fr);
  //   }
  //   &.col-7 {
  //     grid-template-columns: repeat(7, 1fr);
  //   }
  //   &.col-8 {
  //     grid-template-columns: repeat(8, 1fr);
  //   }
  //   &.gap-5 {
  //     grid-gap: 5px;
  //   }
  //   &.gap-10 {
  //     grid-gap: 10px;
  //   }
  //   &.gap-15 {
  //     grid-gap: 15px;
  //   }
  //   &.gap-20 {
  //     grid-gap: 20px;
  //   }
  //   &.gap-30 {
  //     grid-gap: 30px;
  //   }
  // }
  &.el-form {
    .el-form-item--label-left {
      .el-form-item__label {
        line-height: 20px;
        display: flex;
        align-items: center;
      }
    }
    .el-form-item:last-of-type {
      margin-bottom: 18px !important;
    }
    .el-form-item.el-form-item--large:last-of-type {
      margin-bottom: 22px !important;
    }
  }
  .el-link + .el-link {
    margin-left: 5px;
  }

  .el-autocomplete {
    width: 100%;
  }

  .el-autocomplete__popper {
    .el-autocomplete-suggestion {
      min-width: 150px !important;
    }
  }
}

.rev-form .el-slider__runway.show-input {
  margin-right: 10px;
}

.vxe-table {
  .el-date-editor.el-input,
  .el-date-editor.el-input__wrapper {
    z-index: 9;
  }
  .preview-icon {
    // position: absolute;
    // right: 2px;
    // top: 2px;
    color: var(--el-color-primary);
    cursor: pointer;
  }
}

.el-dialog {
  .main-table {
    height: 400px;
  }
  .table-pagination {
    margin-top: 10px;
  }
}
.rev-dialog {
  .el-dialog {
    .el-dialog__body {
      padding: 0;
      & > .el-scrollbar {
        padding: var(--el-dialog-padding-primary);
      }
    }
  }
  .el-dialog__body {
    padding: var(--el-dialog-padding-primary);
  }
  .el-scrollbar__view {
    height: 100%;
  }
  .el-dialog__headerbtn {
    width: 35px;
    height: 35px;
    top: 6px;
  }
}
.rev-table,
.select-dialog {
  --vxe-table-border-color: #ebeef5;
  --vxe-table-header-font-color: #909399;
  --vxe-font-color: #606266;

  // .el-form--inline .el-form-item {
  //   margin-right: 24px;
  //   margin-bottom: 8px;
  // }
  .el-button + .el-dropdown {
    margin-left: 12px;
  }
  .el-dropdown-link {
    cursor: pointer;
    color: var(--el-color-primary);
    display: flex;
    align-items: center;
  }
}
.rev-table .el-drawer__body {
  padding-top: 15px;
}
body .vxe-table--tooltip-wrapper {
  z-index: 3555 !important;
}
body .vxe-input--panel.is--transfer {
  z-index: 3555 !important;
}
body .el-card {
  --el-card-padding: 15px;
}

.rev-table {
  .table-dashed-add {
    margin-top: 10px;
    display: flex;

    .button-dashed-add {
      width: 100%;
      border: 1px dashed var(--el-button-border-color);
    }
  }

  .el-form-item.expand-hide {
    display: none;
  }

  .rev-query-form {
    position: relative;
    height: 50px;
    overflow: hidden;

    &.expand {
      height: auto;
      overflow: unset;
    }

    .rev-query-expand {
      position: absolute;
      right: 0;
      top: 2px;
    }
  }

  .query-right {
    .el-form {
      .el-form-item:last-child {
        margin-right: 0;
      }
    }
  }

  .main-table {
    .vxe-table .vxe-cell {
      .el-select,
      .el-textarea {
        z-index: 1;
      }
      .el-link {
        display: inline;
        .el-icon {
          vertical-align: text-bottom;
        }
        .el-link__inner {
          display: inline;
        }
      }
    }
    // 临时解决，设置border: 'inner' 后，resizable: true 不显示的问题
    .vxe-table--render-default .vxe-table--border-line {
      display: none;
    }
  }
  .table-cell-operation {
    cursor: pointer;
    &:hover {
      border-bottom: 1px solid var(--el-color-primary);
    }
    .el-icon {
      vertical-align: text-bottom;
    }
  }
}
.el-message-box.custom-component {
  .el-message-box__message {
    width: 100%;
  }
  .el-message-box__btns {
    display: none;
  }
  .default-module {
    min-height: unset;
    // 作为弹框时的高度
    .one-module {
      height: 80vh !important;
      flex: 1 1 80vh !important;
    }
  }
}
.default-module {
  display: grid;
  grid-template-columns: 100%;
  width: 100%;
  height: 100%;
  min-height: calc(
    100vh - var(--tags-view-height) - var(--top-tool-height) - var(--app-footer-height) -
      var(--app-content-padding) - var(--app-content-padding) - 1px
  );
  grid-gap: 20px;
  place-content: unset;
  .one-module {
    height: calc(
      100vh - var(--tags-view-height) - var(--top-tool-height) - var(--app-footer-height) -
        var(--app-content-padding) - var(--app-content-padding) - 1px
    ) !important;
    position: relative;
    overflow: auto;
    .rev-table {
      & > .rev-card + .rev-card {
        margin-top: 5px;
      }
      position: relative;
      display: flex;
      flex-direction: column;
      overflow: hidden;

      .el-card__body {
        position: relative;
        display: flex;
        flex-direction: column;
        overflow: hidden;
      }
      .main-table {
        overflow: hidden;
        position: relative;
        flex: 1;
      }

      &.relation-table {
        position: relative;
      }
    }
  }
}
.table-word {
  --vxe-table-row-height-default: 22px;
  --vxe-table-column-padding-default: 0;
}

.el-message-box.custom-component {
  .el-message-box__message {
    width: 100%;
  }
  .el-message-box__btns {
    display: none;
  }
}

.flex-divider-slide {
  width: 5px;
  cursor: ew-resize; /* 鼠标样式为左右调整 */
  &:hover {
    background-color: #ddd;
  }
}

@media screen and (max-width: 576px) {
  .el-form-item__label {
    width: unset !important;
    text-align: unset !important;
    justify-content: unset !important;
  }
  .el-drawer.rtl {
    width: 100% !important;
    .auto-grid {
      padding: 10px 20px;
    }
  }
}

// 移动端适配
.is-mobile {
  .auto-grid {
    &.query-grid {
      .el-select,
      .el-input,
      .el-textarea {
        width: 35vw;
      }
      .my-cascader {
        .el-select,
        .el-input {
          width: 100%;
        }
      }
    }
    &.el-form--inline {
      .el-form-item {
        margin-right: 18px;
        margin-bottom: 12px;
      }
    }
  }
  .rev-table {
    .el-form-item.expand-hide {
      display: none;
    }
    .rev-query-form {
      height: 74px;
      &.expand {
        height: auto;
        overflow: unset;
      }
      .rev-query-expand {
        top: 0;
      }
      .el-form {
        .el-form-item:last-of-type {
          display: flex;
          align-items: flex-end;
          margin-bottom: 12px !important;
        }
      }
    }
    .query-tools {
      margin-bottom: 0 !important;
      .el-button {
        margin-bottom: 10px;
      }
    }
  }
  .rev-dialog {
    .el-dialog {
      .el-dialog__body {
        padding: 0;
        & > .el-scrollbar {
          padding: var(--el-dialog-padding-primary);
        }
      }
    }
  }
}

.ck-content .ck-suggestion-marker-insertion {
  border-top: 3px solid #1eae3159;
  border-bottom: 3px solid #1eae3159;
  background: #66e57759;
}

.ck-content .ck-suggestion-marker-deletion {
  border-top: 3px solid #ae1e4259;
  border-bottom: 3px solid #ae1e4259;
  text-decoration: line-through;
  text-decoration-color: #570f2180;
  text-decoration-thickness: 3px;
  background: #e5668659;
}
